from sklearn import metrics
import math

def show_metrics(y_test,y_pred):
    confmat = metrics.confusion_matrix(y_true=y_test, y_pred=y_pred)
    print("accuracy:",metrics.accuracy_score(y_test, y_pred))
    print('------Weighted------')
    print('Weighted precision', metrics.precision_score(y_test, y_pred, average='weighted'))
    print('Weighted recall', metrics.recall_score(y_test, y_pred, average='weighted'))
    print('Weighted f1-score', metrics.f1_score(y_test, y_pred, average='weighted'))
    print('------Macro------')
    print('Macro precision', metrics.precision_score(y_test, y_pred, average='macro'))
    print('Macro recall', metrics.recall_score(y_test, y_pred, average='macro'))
    print('Macro f1-score', metrics.f1_score(y_test, y_pred, average='macro'))
    print('------Micro------')
    print('Micro precision', metrics.precision_score(y_test, y_pred, average='micro'))
    print('Micro recall', metrics.recall_score(y_test, y_pred, average='micro'))
    print('Micro f1-score', metrics.f1_score(y_test, y_pred, average='micro'))
